﻿@model TestOnlineProject.Models.Entities.Subject
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="site_map">
    @Html.ActionLink("Home", "Index", "Home") / @Html.ActionLink("Subjects", "Index", "Subject")
    / Edit Subject</div>
<br />
<div class="main_nav">
    <span><a href="@Url.Content("~/Subject/Details")?id=@Model.SubjectId">
        <img src="@Url.Content("~/Images/back button.png")" /></a> </span>
</div>
<br />
<span class="require_info">(*) is required.</span>
@using (Html.BeginForm())
{
    <span class="errorMsg">@Html.ValidationSummary(true)</span>
    
    <table class="table table-bordered">
        <tr>
            <td style="width: 150px; text-align: right">
                Code<span>&nbsp;(*)</span>
            </td>
            <td>
                @Html.HiddenFor(model => model.SubjectId)
                <span class="errorMsg">@Html.ValidationMessageFor(model => model.Code)</span>
                @Html.EditorFor(model => model.Code)
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
                Name<span>&nbsp;(*)</span>
            </td>
            <td>
                <span class="errorMsg">@Html.ValidationMessageFor(model => model.Name)</span>
                @Html.EditorFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
            </td>
            <td>
                <button type="submit" value="Save" class="btn" style="width: 80px">
                    Save</button>
                @Html.ActionLink("Reset", "Edit", new { id = @Model.SubjectId }, new { @class = "btn", style = "width: 54px" })
                @Html.ActionLink("Cancel", "Details", new { id = @Model.SubjectId }, new { @class = "btn", style = "width: 54px" })
            </td>
        </tr>
    </table>
   
}
